<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div>

    <div class="form-group">
        <label for="c-group_type" class="control-label col-xs-12 col-sm-2">{:__('角色期限')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupTypeList}
        </div>
    </div>

    <div class="form-group" id="group_end_time" {if condition="$row.group_type == 2"} style="display: block;" {else /} style="display: none;" {/if}>
        <label for="c-group-end-time" class="control-label col-xs-12 col-sm-2">{:__('角色到期时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='input-group datetimepicker' style="width: 60%">
                <input type='text' class="form-control" id="c-group-end-time" name="group_end_time" value="{$row.group_end_time|htmlentities}" disabled/>
                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('学号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="text" placeholder="{:__('Number')}" value="{$row.number|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[name]" type="text" placeholder="{:__('Name')}" value="{$row.name|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('性别')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[gender]', $genderData, $row['gender'], ['class'=>'form-control selectpicker gender', 'data-rule'=>'required', 'disabled'])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-id-number" class="control-label col-xs-12 col-sm-2">{:__('身份证')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id-number" class="form-control" name="row[id_number]" type="text" value="{$row.id_number|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label for="c-enrollment-year" class="control-label col-xs-12 col-sm-2">{:__('入学年份')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-enrollment-year" class="form-control" name="row[enrollment_year]" type="text" value="{$row.enrollment_year|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('院系')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[faculty_id]', $facultyData, $row['faculty_id'], ['class'=>'form-control selectpicker', 'data-rule'=>'required', 'disabled'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('专业')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[major_id]', $majorData, $row['major_id'], ['class'=>'form-control selectpicker', 'data-rule'=>'required', 'disabled'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('年级/班级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="grade_id,class_id">
                <select class="form-control grade_id" name="grade_id" data-url="base/grade/cxSelect" disabled="disabled">
                    <option value="{$row['grade_id']}" selected=""></option>
                </select>
                <select class="form-control class_id" name="row[class_id]" data-url="base/classes/cxSelect" data-query-name="grade_id" disabled="disabled">
                    <option value="{$row['class_id']}" selected=""></option>
                </select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('床位')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="garden_number,building_number,dorm_number,bed_id">
                <select class="garden_number form-control" name="garden_number" data-url="dormitory/garden/cxSelect" disabled="disabled">
                    <option value="{$row['bed']['garden_number']}" selected=""></option>
                </select>
                <select class="building_number form-control" name="building_number" data-url="dormitory/building/cxSelect?dorm_type={$row['gender']}" data-query-name="garden_number" disabled="disabled">
                    <option value="{$row['bed']['building_number']}" selected=""></option>
                </select>
                <select class="dorm_number form-control" name="dorm_number" data-url="dormitory/dorm/cxSelect?dorm_type={$row['gender']}" data-query-name="building_number" disabled="disabled">
                    <option value="{$row['bed']['dorm_number']}" selected=""></option>
                </select>
                <select class="bed_id form-control" name="bed_id" data-url="dormitory/bed/cxSelect?status={$row['is_bed'] ? 'all' : '1'}&dorm_type={$row['gender']}" data-query-name="dorm_number" disabled="disabled">
                    <option value="{$row['bed']['id']}" selected=""></option>
                </select>
            </div>

        </div>
    </div>

</form>
